# print("Performance:", performance)
player = ["Me", "Kobe", "Yao", "O'Neal"]
scores = [0, 81, 41, 40]
height = [140, 198, 225, 218]
performance = list(zip(player, scores, height))
print(performance)
sorted_performance = sorted(
    performance, key=lambda item: (item[1], item[2]), reverse=True
)
print("Sorted by score fisrt,then height:", sorted_performance)
words = ["Python", "", "AI", "", "Data"]
filtered = list(filter(None, words))  # None 表示直接过滤 False 值
print(filtered)
# def get_score(item):
#     return item[1]


# player = ["Me", "Kobe", "Yao", "O'Neal"]
# scores = [0, 81, 40, 40]

# # Materialize the zip to a list so it can be iterated multiple times.
# performance = list(zip(player, scores))
# print("Performance:", performance)

# # Sort by score (descending). Set reverse=False for ascending order.
# sorted_performance = sorted(performance, key=lambda item: item[1], reverse=True)
# print("Sorted by score (desc):", sorted_performance)
